#include "type.h"

#define BANK_0 0x00
#define BANK_1 0x01
#define BANK_2 0x02
#define BANK_3 0x03
#define BANK_4 0x04

#define PIN_0   0x00
#define PIN_1   0x01
#define PIN_2   0x02
#define PIN_3   0x03
#define PIN_4   0x04
#define PIN_5   0x05
#define PIN_6   0x06
#define PIN_7   0x07
#define PIN_8   0x08
#define PIN_9   0x09
#define PIN_10  0x0A
#define PIN_11  0x0B
#define PIN_12  0x0C
#define PIN_13  0x0D
#define PIN_14  0x0E
#define PIN_15  0x0F
#define PIN_16  0x10
#define PIN_17  0x11
#define PIN_18  0x12
#define PIN_19  0x13
#define PIN_20  0x14
#define PIN_21  0x15
#define PIN_22  0x16
#define PIN_23  0x17
#define PIN_24  0x18
#define PIN_25  0x19
#define PIN_26  0x1A
#define PIN_27  0x1B
#define PIN_28  0x1C
#define PIN_29  0x1D
#define PIN_30  0x1E
#define PIN_31  0x1F



#define PIN_FUNCTION_GPIO  0x00
#define PIN_FUNCTION_1     0x01
#define PIN_FUNCTION_2     0x02
#define PIN_FUNCTION_3     0x03

#define PIN_MODE_PULLUP      0x00
#define PIN_MODE_REPEATER    0x01
#define PIN_MODE_FLOAT       0x02
#define PIN_MODE_PULLDOWN    0x03


#define LOW_REGISTER_ACCESS  0x00
#define HIGH_REGISTER_ACCESS 0x01


void pin_configure(uint8_t bank, uint8_t pin, uint8_t function, uint8_t mode);
